<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
    <title>美策平台</title>
    <link rel="icon" type="image/png" href="/img/icon.png">
    <link rel="stylesheet" type="text/css" href="../datepicker/jquery-ui.min.css">
    <link rel="stylesheet" type="text/css" href="../css/app.css">
    <link rel="stylesheet" type="text/css" href="../css/orderGrad.css">
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="/pc/js/all.js"></script>
    <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
    <script type="text/javascript" src="../js/getPageId.js"></script>
</head>
<body>
    <!-- 生产跟单 -->
    <div class="orderProductionDocumentary">
        <div class="orderParamTitle">
            生产跟单
            <img src="../images/return.png" class="orderRtns" onclick="window.location.href = 'orderDocking.html'">
        </div>
        <div style="height:1.066667rem"></div>
        <div class="content">
            <div class="orderDetail">

            </div>
            <div class="orderCotent">
                <p>订单详情</p>
                <ul>

                </ul>
                <div class="documentaryReport">
                    <div onclick="window.location.href='orderDocumentaryInspectionReport.html?id='+pageId">跟单报告</div>
                </div>
            </div>
            <div class="orderDown">
                <div onclick="window.location.href='shippingTransportation.html?id='+pageId">下一步</div>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="../js/app.js"></script>
<script type="text/javascript" src="../js/orderPageChange.js"></script>
<script type="text/javascript" src="../js/order.js"></script>
<script type="text/javascript" src="../js/alertMsg.js"></script>
<script>
    $(function() {
        var userInfo = JSON.parse(localStorage.getItem('userInfo'));
        var app_access = userInfo.app_access;
        var token = userInfo.token;
        var orderShow = {
            getOrderId: function() {
                var data = {
                    id: pageId,
                    app_access: app_access,
                    token: token
                }
                $.ajax({
                    url: '/api/order/my/detail',
                    data: data,
                    type: 'get',
                    dataType: 'json',
                    success: function(res) {
                        console.log(res)
                        if (res.code != 200) {
                            alertMsg(res.msg)
                        } else {
                            var orderProductionDocumentaryHtml ='<li>'+
                                                                    '<div>中单企业</div>'+
                                                                    '<div>'+res.data.com_name+'</div>'+
                                                                '</li>'+
                                                                '<li>'+
                                                                    '<div>企业地址</div>'+
                                                                    '<div>'+res.data.com_address+'</div>'+
                                                                '</li>'+
                                                                '<li>'+
                                                                    '<div>负责人</div>'+
                                                                    '<div>'+res.data.legal_name+'</div>'+
                                                                '</li>'+
                                                                '<li>'+
                                                                    '<div>联系方式</div>'+
                                                                    '<div>'+res.data.legal_mobile+'</div>'+
                                                                '</li>'+
                                                                '<li>'+
                                                                    '<div>订单数量</div>'+
                                                                    '<div>'+res.data.num+'</div>'+
                                                                '</li>'+
                                                                '<li>'+
                                                                    '<div>订单金额</div>'+
                                                                    '<div>'+res.data.money+'</div>'+
                                                                '</li>'+
                                                                '<li>'+
                                                                    '<div>订单总价</div>'+
                                                                    '<div>'+res.data.all_money+'</div>'+
                                                                '</li>'+
                                                                '<li>'+
                                                                    '<div>厂家备注</div>'+
                                                                    '<div>'+res.data.note+'</div>'+
                                                                '</li>'+
                                                                '<li>'+
                                                                    '<div>下单时间</div>'+
                                                                    '<div>'+res.data.created_at+'</div>'+
                                                                '</li>'+
                                                                '<li>'+
                                                                    '<div>快递运单</div>'+
                                                                    '<div>'+res.data.kd_code+'</div>'+
                                                                '</li>'+
                                                                '<li>'+
                                                                    '<div>快递类型</div>'+
                                                                    '<div>'+res.data.kd_name+'</div>'+
                                                                '</li>'+
                                                                '<li>'+
                                                                    '<div>生产进度</div>'+
                                                                    '<div>'+res.data.status+'</div>'+
                                                                '</li>'+
                                                                '<li class="custom">'+
                                                                    '<div>自定义属性</div>'+
                                                                    '<div>自定义内容</div>'+
                                                                '</li>'
                        $('.orderCotent ul').html(orderProductionDocumentaryHtml)

                        var orderDetail ='<img src="'+res.data.status+'" alt="">\n' +
                            '                <div>'+res.data.detail+'</div>';
                        $('.orderDetail').html(orderDetail)
                        }
                    },
                    err: function(err) {
                        alertMsg(err)
                    }
                })
            }
        }
       
        orderShow.getOrderId()
    })
</script>
</body>
</html>